package com.hnkywl.sts.dao.shgl;

import com.hnkywl.sts.entity.shgl.Ablbzjgk;
import com.hnkywl.sts.entity.shgl.Wbzjgk;
import com.hnkywl.sts.entity.xsgl.Xsd;
import net.ruixin.orm.hibernate.SimpleHibernateTemplate;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 说明：
 * 包:        com.hnkywl.sts.dao.sfgl
 * 类描述:    按比例保证金赎货dao类
 * 修改备注: [说明本次修改内容]
 * 版本:        [v1.0]
 */
@Repository
public class AblbzjshDao extends SimpleHibernateTemplate<Ablbzjgk, Long> {

    public Ablbzjgk findAblbzjgk(Xsd xsdItem) {
        String hql = "from Ablbzjgk where xsd_id= ?";
        List<Ablbzjgk> list = this.find(hql, xsdItem.getId());
        if (null != list && list.size() > 0) {
            return list.get(0);
        }
        return null;
    }

    public List<Ablbzjgk> findAllAblbzjgk(Xsd xsdItem) {
        String hql = "from Ablbzjgk where xsd_id= ?";
        List<Ablbzjgk> list = this.find(hql, xsdItem.getId());
        return list;
    }
}
